<?php /* Smarty version Smarty-3.1.14, created on 2017-08-18 16:20:08
         compiled from "E:\phpStudy\WWW\zyshop\admin\templates\news_type_edit.html" */ ?>
<?php /*%%SmartyHeaderCode:154185996a3383cbcc2-98241389%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'c0989692dd1affb928f8760ffa6aede1d602b0a7' => 
    array (
      0 => 'E:\\phpStudy\\WWW\\zyshop\\admin\\templates\\news_type_edit.html',
      1 => 1502503248,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '154185996a3383cbcc2-98241389',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'list' => 0,
    'edit' => 0,
    'type' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_5996a338402cb3_89569484',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5996a338402cb3_89569484')) {function content_5996a338402cb3_89569484($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<style>
td {font-weight: bold;}
.firtd {	width: 100px;	padding-right: 10px;	text-align: right;}
input {	width: 350px;}
textarea {	width: 350px;	height: 100px;}
</style>
<body>
<div class="fixed-bar">
  <div class="item-title">
    <h3>编辑文章分类</h3>
  </div>
</div>
<div class="fixed_bottom">
  <form method="post" action="news_type.php" id="aspnetForm" name="form1" enctype="multipart/form-data">
  	<input type="hidden" name="ad_id" id="ad_id" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['ad_id'];?>
" />
    <table style=" width:100%;" cellpadding="0" cellspacing="0" class="table tb-type2">
      <tbody>
        <tr>
          <td class="firtd"> 文章分类名称:</td>
          <td><input type="text" name="cat_name" required value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['cat_name'];?>
"> *</td> 
        </tr>
        <tr>
          <td class="firtd"> 上级分类:</td>
          <td>
              <select name="parent_id"  onchange="get_news_type(this,this.value)" id="">
                  <option value="0" id="option">==顶级==</option>
                  <?php echo $_smarty_tpl->tpl_vars['type']->value;?>

              </select>
          </td>
        </tr>
        <tr>
          <td class="firtd"> 排序:</td>
          <td><input type="text" name="sort_order" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['sort_order'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> 关键字:</td>
          <td>
            <input type="text" name="keywords" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['keywords'];?>
">
          </td>
        </tr>
        <tr>
          <td class="firtd"> 描述:</td>
          <td><textarea name="cat_desc" style="min-height:120px; max-height:120px;"><?php echo $_smarty_tpl->tpl_vars['edit']->value['cat_desc'];?>
</textarea></td>
        </tr>
        <tr>
          <td class="style1">&nbsp;</td>
          <td>
              <input type="hidden" name="act" value="edit">
              <input type="hidden" name="cat_id" value="<?php echo $_smarty_tpl->tpl_vars['edit']->value['cat_id'];?>
<">
              <a href="JavaScript:void(0);" class="btn" onclick="reset()"><span>重置</span></a>
              <a href="JavaScript:void(0);" class="btn" onclick="$('#tj').click()"><span>确认提交</span></a>
          </td>
        </tr>
      </tbody>
    </table>
    <input type="reset" id="cz" style="display: none;">
    <input type="submit" id="tj" style="display:none;";>
  </form>
</div>
</body>

<script>
// 重置方法
function reset(){
	$('input').val('');
	$('textarea').text('');
	$('select').val('');
}
//选择分类调用方法
function get_news_type(obj,id){
  $.post("news_type.php",{act:'type_judge',cat_id:id},function(data){
        if(data==2){
            alert("系统保留分类,不允许添加子分类");
             $("#option").eq(0).attr("selected","selected");  
        }
  })
}
</script>
</html><?php }} ?>